﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using DongleManage.Model.BaseClass;
using System.Data;

namespace  DongleManage.Model.EssentialData
{

		
	/// <summary>
	///  动作和肌肉的关系
	/// </summary>
	/// <remarks>
	/// 该实体由工具生成，尽量不要手动修改
	/// </remarks>
	[DataContract]
	public partial class ActionMuscleRelationEntity :BaseEntity
	{
		#region 属性、变量声明
		#region 主属性 --对应数据表主键
		/// <summary>			
		/// TransactionNumber : 
		/// </summary>
		/// <remarks>表Action_MuscleRelation主键</remarks>
		[DisplayName("主键")]
		[DataMember]
		public int TransactionNumber
        {
            get;
            set;
        }
		#endregion
		
		#region 属性
		
		/// <summary>
		/// 动作编码
		/// </summary>
        [DisplayName("动作编码")]
        
		[DataMember]
		public Int32? ActionCode
        {
            get;
            set;
        }
		
		/// <summary>
		///  动作名称
		/// </summary>
        [DisplayName("动作名称")]
        [StringLength(128, ErrorMessage = "请勿输入超过 128 个字!")]
        
		[DataMember]
		public String ActionName
        {
            get;
            set;
        }
		
		/// <summary>
		/// 肌肉组编码 
		/// </summary>
        [DisplayName("肌肉组编码")]
        
		[DataMember]
		public Int32? MuscleGroupCode
        {
            get;
            set;
        }
		
		/// <summary>
		/// MuscleCode : 
		/// </summary>
        [DisplayName("肌肉编码")]
        
		[DataMember]
		public Int32? MuscleCode
        {
            get;
            set;
        }
		
		/// <summary>
		/// 肌肉名称 
		/// </summary>
        [DisplayName("")]
        [StringLength(128, ErrorMessage = "请勿输入超过 128 个字!")]
        
		[DataMember]
		public String MuscleName
        {
            get;
            set;
        }
			
		#endregion

		#endregion 属性、变量声明
		
	    public ActionMuscleRelationEntity()
        {
            TransactionNumber = 0;
            ActionCode = null;
            ActionName = null;
            MuscleGroupCode = null;
            MuscleCode = null;
            MuscleName = null;
            InUserID = (int)0;
            InDate = DateTime.Now;
            EditUserID = (int)0;
            EditDate = null;
        }

        public ActionMuscleRelationEntity(IDataReader dataReader)
            : base(dataReader)
        {
            TransactionNumber = Convert.IsDBNull(dataReader["Code"]) ? 0 : Convert.ToInt32(dataReader["Code"]);
            ActionCode = Convert.IsDBNull(dataReader["ActionCode"]) ? 0 : Convert.ToInt32(dataReader["ActionCode"]);
            ActionName = Convert.IsDBNull(dataReader["ActionName"]) ? "" : Convert.ToString(dataReader["ActionName"]);
            MuscleGroupCode = Convert.IsDBNull(dataReader["MuscleGroupCode"]) ? 0 : Convert.ToInt32(dataReader["MuscleGroupCode"]);
            MuscleCode = Convert.IsDBNull(dataReader["MuscleCode"]) ? 0 : Convert.ToInt32(dataReader["MuscleCode"]);
            MuscleName = Convert.IsDBNull(dataReader["MuscleName"]) ? "": Convert.ToString(dataReader["MuscleName"]);
        }
	}
}
